package com.vst.hsd.dominio;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;


/**
 * The persistent class for the lista database table.
 * 
 */
@Entity
public class Lista extends Recurso implements  Serializable {
	private static final long serialVersionUID = 1L;


	@Column(name="codigo")
	private String codigo;
	
	@Column(name="descripcion")
	private String descripcion;

	@Column(name="id_menu")
	private Integer idMenu;

	private String tabla;

	//bi-directional many-to-one association to ColumnPorGrid
	@OneToMany(mappedBy="lista")
	private List<ColumnPorGrid> columnPorGrids;

	//bi-directional many-to-many association to Menu
    @ManyToMany
	@JoinTable(
		name="lista_por_menu"
		, joinColumns={
			@JoinColumn(name="lista_id_recurso")
			}
		, inverseJoinColumns={
			@JoinColumn(name="id_menu")
			}
		)
	private List<Menu> menus;

    public Lista() {
    }

	public String getCodigo() {
		return this.codigo;
	}

	public void setCodigo(String codigo) {
		this.codigo = codigo;
	}

	public String getDescripcion() {
		return this.descripcion;
	}

	public void setDescripcion(String descripcion) {
		this.descripcion = descripcion;
	}

	public int getIdMenu() {
		return this.idMenu;
	}

	public void setIdMenu(int idMenu) {
		this.idMenu = idMenu;
	}

	public String getTabla() {
		return this.tabla;
	}

	public void setTabla(String tabla) {
		this.tabla = tabla;
	}

	public List<ColumnPorGrid> getColumnPorGrids() {
		return this.columnPorGrids;
	}

	public void setColumnPorGrids(List<ColumnPorGrid> columnPorGrids) {
		this.columnPorGrids = columnPorGrids;
	}
	
	public List<Menu> getMenus() {
		return this.menus;
	}

	public void setMenus(List<Menu> menus) {
		this.menus = menus;
	}
	
}